Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adds validation styles to datepicker #2398

Merged
merged 8 commits into from
May 23, 2023

Conversation

werdnanoslen
Copy link
Contributor

Summary

Adds validation styles (and corresponding story) to DatePicker component, which uses a standard <input> instead of our input component, which already has that validation.

Related Issues or PRs

Resolves #2263

How To Test

  1. Open http://localhost:9009/?path=/docs/components-date-picker--complete-date-picker
  2. Check each validationStatus control

Screenshots (optional)

image

Copy link
Contributor

@brandonlenz brandonlenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey looks familiar 😆

With a couple unit tests to check that the right class is applied when the prop is set, I'm good to approve

brandonlenz
brandonlenz previously approved these changes May 12, 2023
Copy link
Contributor

@brandonlenz brandonlenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change I recommend making (a small nit/nice to have)

src/components/forms/DatePicker/DatePicker.test.tsx Outdated Show resolved Hide resolved
Co-authored-by: Brandon Lenz <brandon@truss.works>
@werdnanoslen werdnanoslen enabled auto-merge (squash) May 12, 2023 17:52
@werdnanoslen werdnanoslen enabled auto-merge (squash) May 23, 2023 15:49
@werdnanoslen werdnanoslen merged commit 161a931 into main May 23, 2023
@werdnanoslen werdnanoslen deleted the an-datepickervalidation-2263 branch May 23, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] DatePicker error handling not up to current USWDS spec
2 participants